package com.ytjj.qmyx.supplychain.common.enums;

/**
 * @ClassName LINK平台接口方法
 * @Description TODO
 *
 * 
 * @Version 1.0
 **/
public enum LinkPlatformOrderTypeEnum {
    BONDED_WHS ("BONDED_WHS","跨境报税"),
    OVERSEAS_DS ("OVERSEAS_DS", "跨境集货"),
    OVERSEAS_WHS ("OVERSEAS_WHS", "海外备货"),
    BIG_TRADE ("07", "大贸")
    ;

    private String code;
    private String message;

    LinkPlatformOrderTypeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static String getMessageByCode(Integer code){
        for (LinkPlatformOrderTypeEnum value : LinkPlatformOrderTypeEnum.values()) {
            if(value.getCode().equals(code)){
                return value.getMessage();
            }
        }
        return null;
    }

    public static String getCodeByMessage(String message){
        for (LinkPlatformOrderTypeEnum value : LinkPlatformOrderTypeEnum.values()) {
            if(value.getMessage().equals(message)){
                return value.getCode();
            }
        }
        return null;
    }
}
